package com.uzai.console.entity.es;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Auther: liuqu
 * @Date: 2021/11/19 11:33
 * @Description: 用户登录日记ES index
 */

@ApiModel("账号操作日志")
@Document(indexName = EsIndexName.UZAI_CONSOLE_USER_OPERATION_LOG, shards = 3, replicas = 2)
public class EsUserOperationLog implements Serializable {

    private static final long serialVersionUID = -7947817308649925285L;

    @ApiModelProperty("主键ID")
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @ApiModelProperty("运营商ID")
    @Field(type = FieldType.Long)
    private Long merId;

    @ApiModelProperty("账户")
    @Field(type = FieldType.Text)
    private String account;

    @ApiModelProperty("接口参数")
    @Field(type = FieldType.Text)
    private String para;

    @ApiModelProperty("模块")
    @Field(type = FieldType.Text)
    private String model;

    @ApiModelProperty("类型")
    @Field(type = FieldType.Text)
    private String type;

    @ApiModelProperty("API接口")
    @Field(type = FieldType.Text)
    private String api;

    @ApiModelProperty("参数内容")
    @Field(type = FieldType.Text)
    private String content;

    @ApiModelProperty("操作时间")
    @Field(type = FieldType.Integer)
    private Integer createTime;

    @ApiModelProperty("是否客服超级账号登录（0-运营商自己登录；1-系统默认密码登录；2-客服超级账号登录）")
    @Field(type = FieldType.Integer)
    private int loginType;

    @ApiModelProperty("超级账号")
    @Field(type = FieldType.Keyword)
    private String managerMobile;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getMerId() {
        return merId;
    }

    public void setMerId(Long merId) {
        this.merId = merId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    public String getApi() {
        return api;
    }

    public void setApi(String api) {
        this.api = api;
    }

    public String getPara() {
        return para;
    }

    public void setPara(String para) {
        this.para = para;
    }

    public int getLoginType() {
        return loginType;
    }

    public void setLoginType(int loginType) {
        this.loginType = loginType;
    }

    public String getManagerMobile() {
        return managerMobile;
    }

    public void setManagerMobile(String managerMobile) {
        this.managerMobile = managerMobile;
    }
}
